<?php
/*
  $Id:$
 */
 
  define('DB_HOST', 'localhost');
  define('DB_NAME', 'test_first');
  define('DB_USER', 'root');
  define('DB_PASS', '');
  
  db_connect(DB_HOST, DB_USER, DB_PASS);
  db_select_db(DB_NAME) or die('database not exists');
  if (intval(substr(mysql_get_server_info(), 0, 1) >= 4)){
    db_query('set names utf8');
  }
  
  foreach (db_fetch_all("select * from configuration") as $configuration) define($configuration['key'], $configuration['value']);